home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / dev / src / intuistar.lha / Fraktalstern / stdwindow.h < prev   
Encoding:
Text File  |  2001-12-21  |  1.4 KB  |  55 lines

  1. /* stdwindow.h */
  2.  
  3. void open_libs(void)
  4.     {
  5.         IntuitionBase = (struct IntuitionBase *)
  6.                         OpenLibrary("intuition.library",0L);
  7.         if (IntuitionBase == NULL) Exit(FALSE);
  8.  
  9.         GfxBase = (struct GfxBase *)
  10.                   OpenLibrary("graphics.library",0L);
  11.         if (GfxBase == NULL)
  12.             {
  13.                 CloseLibrary(IntuitionBase); /* Int.-Lib zu */
  14.                 Exit(FALSE);                 /* Abbruch     */
  15.            }
  16.     }
  17.     struct window *open_window (short x, short y,
  18.                                          short w, short h,
  19.                                          char *name,
  20.                                          ULONG flags,
  21.                                          ULONG i_flags,
  22.                                          struct Gadget *gadget )
  23.         {
  24.             struct NewWindow nw;
  25.  
  26.         nw.LeftEdge = x;    /* linke Kante des Fensters */
  27.         nw.TopEdge = y;     /* obere Kante des Fensters */
  28.         nw.Width = w;       /* Breite des Fensters      */
  29.         nw.Height = h;      /* Höhe des Fensters        */
  30.         nw.DetailPen = -1;
  31.         nw.BlockPen  = -1;
  32.         nw.Title = (UBYTE *) name;    /* Fenster-Titel  */
  33.         nw.Flags = flags;             /* Welche Gadgets */
  34.         nw.IDCMPFlags = i_flags;      /* Welche IDCMP's */
  35.         nw.Screen = NULL;
  36.         nw.Type = WBENCHSCREEN;
  37.         nw.FirstGadget = gadget;
  38.         nw.CheckMark = NULL;
  39.         nw.BitMap =  0;
  40.         nw.MinWidth =  -1; nw.MinHeight = -1;
  41.         nw.MaxWidth =  -1; nw.MaxHeight = -1;
  42.  
  43.         return( (struct window *) OpenWindow(&nw) );
  44.  
  45.         }
  46.  
  47.         void close_all(void)
  48.             {
  49.                 CloseWindow(Window);
  50.                 CloseLibrary(GfxBase);
  51.                 CloseLibrary(IntuitionBase);
  52.                 Exit(TRUE);
  53.             }
  54.  
  55.